import { defineStore } from 'pinia'

export const useStore = defineStore('storeId', {
  state: () => {
    return {
      num:0,
      name:'张三'
    }
  },
  getters:{
  	changeNum(){
  		console.log('getters');
  		return this.num + 1000;
  	}
  },
  actions:{
  	upNum( val ){
  		this.num += val;
  	}
  }
})